function checkPalindrome(str,id){
    let len = str.length;
    for(let i = 0;i<len/2;++i)
        if(str[i]!==str[len-i-1]){
            document.getElementById(id).innerHTML="不是回文串";
            return ;
        }
    document.getElementById(id).innerHTML="是回文串";
}